package com.t.bricks.bussiness.db.entity.tablekey.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

import com.t.bricks.annotation.DataInfo;

/**
 * 记录编号序列管理表'TableKey'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("记录编号序列管理表TableKey")
@DataInfo(sDbName="BricksBaseSystem", sTableName="TableKey")
public class TableKeyBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 表编号(非自增长)
	 */
	//[start]
	@DataInfo( sDbName="BricksBaseSystem", sTableName="TableKey",
		sName="iId", sComment="表编号(非自增长)", isDbField=true, sDbFileType="bigint",
		sDefaultData="0", isExtra=false, iskey=true, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="表编号(非自增长)", example="0", position=0)
	//[end]
	protected Long iId;

	/**
	 * 类型
	 */
	//[start]
	@DataInfo( sDbName="BricksBaseSystem", sTableName="TableKey",
		sName="sType", sComment="类型", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=30, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="类型", example="", position=1)
	//[end]
	protected String sType;

	/**
	 * 值
	 */
	//[start]
	@DataInfo( sDbName="BricksBaseSystem", sTableName="TableKey",
		sName="sValue", sComment="值", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=30, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="值", example="", position=2)
	//[end]
	protected String sValue;

	/**
	 * 序号
	 */
	//[start]
	@DataInfo( sDbName="BricksBaseSystem", sTableName="TableKey",
		sName="iIndex", sComment="序号", isDbField=true, sDbFileType="int",
		sDefaultData="0", isExtra=false, iskey=false, isNull=true,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="序号", example="0", position=3)
	//[end]
	protected Integer iIndex;

	/**
	 * 版本号
	 */
	//[start]
	@DataInfo( sDbName="BricksBaseSystem", sTableName="TableKey",
		sName="iVersion", sComment="版本号", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=4 )
	@ApiModelProperty(value="版本号", example="1", position=4)
	//[end]
	protected Integer iVersion;

	/**
	 * 取 表编号(非自增长)
	 * @return Long
	 */
	public Long getiId() {
		return iId;
	}

	/**
	 * 设置 表编号(非自增长)
	 * @param iId
	 */
	public void setiId(Long iId) {
		this.iId = iId;
	}

	/**
	 * 取 类型
	 * @return String
	 */
	public String getsType() {
		return sType;
	}

	/**
	 * 设置类型
	 * @param sType
	 */
	public void setsType(String sType) {
		this.sType = sType;
	}

	/**
	 * 取 值
	 * @return String
	 */
	public String getsValue() {
		return sValue;
	}

	/**
	 * 设置值
	 * @param sValue
	 */
	public void setsValue(String sValue) {
		this.sValue = sValue;
	}

	/**
	 * 取 序号
	 * @return Integer
	 */
	public Integer getiIndex() {
		return iIndex;
	}

	/**
	 * 设置序号
	 * @param iIndex
	 */
	public void setiIndex(Integer iIndex) {
		this.iIndex = iIndex;
	}

	/**
	 * 取 版本号
	 * @return Integer
	 */
	public Integer getiVersion() {
		return iVersion;
	}

	/**
	 * 设置版本号
	 * @param iVersion
	 */
	public void setiVersion(Integer iVersion) {
		this.iVersion = iVersion;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return TableKeyBase
	 */
	public static TableKeyBase copy(TableKeyBase source) {
		if (null == source) {
			return null;
		}
		
		TableKeyBase target = new TableKeyBase();
		target.setiId(source.getiId());
		target.setsType(source.getsType());
		target.setsValue(source.getsValue());
		target.setiIndex(source.getiIndex());
		target.setiVersion(source.getiVersion());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return TableKeyBase
	 */
	public TableKeyBase clone() {
		return copy(this);
	}
	
}
